<!DOCTYPE html>
<html lang='zh-CN'>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <include file="Public/title"/>
</head>
<body>
<div class="mainWrap">
    <!--标题-->
    <div class="mainWrapHeader">
        <h1 class="mainWrapTit">{$seotitle}</h1>
    </div>
    <!--标题-->
    <form action="{:U('partner_add_save',array('action'=>'add'))}" method="post" class="dataForm" id="dataForm">
        <div class="mainWrapBd">
            <div class="tab-con" id="tab-works">
                <table cellpadding="0" border="0" cellspacing="0" class="stdedit">
                    <tr>
                        <th>城市合伙人姓名</th>
                        <td><input type="text" name="name" id="name" class="sys_text"/></td>
                        <th>身份证号</th>
                        <td><input type="text" name="cert_id" id="cert_id" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>登录手机</th>
                        <td><input type="text" name="mobile" id="mobile" class="sys_text"/></td>
                        <th>登录密码</th>
                        <td><input type="password" name="password" id="password" class="sys_text" maxlength="18"/></td>
                    </tr>
                    <tr>
                        <th>邀请码</th>
                        <td><input type="text" name="invite_code" id="invite_code" readonly class="sys_text"/>
                            <input type="button" id="get_invite_code" class="submit" value="获取邀请码"/></td>
                        <th>合伙人图像</th>
                        <td>
                            <input type="hidden" name="headimg" id="headimg"/>
                            <img id="headimg_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('headimg', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                    </tr>
                    <tr>
                        <th>团队人数</th>
                        <td><input type="text" name="team_count" id="team_count" class="sys_text"/></td>
                        <th>公司名称</th>
                        <td colspan="3"><input type="text" name="company_name" id="company_name" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>法人代表</th>
                        <td><input type="text" name="corporation_name" id="corporation_name" class="sys_text"/></td>
                        <th>联系方式</th>
                        <td><input type="text" name="telphone" id="telphone" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>公司地区</th>
                        <td>
                            <select id="province1" name="province1" onchange="chooseProvince(this)">
                                <option value="0">请选择省</option>
                            </select>
                            <select id="city1" name="city1" onchange="chooseCity(this)">
                                <option value="0">请选择市</option>
                            </select>
                            <select id="area1" name="area1" onchange="chooseArea(this)">
                                <option value="0">请选择区</option>
                            </select>
                            <input type="hidden" id="province" name="province" value="">
                            <input type="hidden" id="city" name="city" value="">
                            <input type="hidden" id="area" name="area" value="">
                        </td>
                        <th>详细地址</th>
                        <td><input type="text" name="address" id="address" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>营业执照</th>
                        <td>
                            <input type="hidden" name="business_license" id="business_license"/>
                            <img id="business_license_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('business_license', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                        <th>合同</th>
                        <td>
                            <input type="hidden" name="contract" id="contract"/>
                            <img id="contract_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('contract', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                    </tr>
                    <tr>
                        <th>身份证正面</th>
                        <td>
                            <input type="hidden" name="certid_front" id="certid_front"/>
                            <img id="certid_front_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('certid_front', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                        <th>身份证反面</th>
                        <td>
                            <input type="hidden" name="certid_side" id="certid_side"/>
                            <img id="certid_side_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('certid_side', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="stdeditSubmit">
                <input type="submit" class="submit" value="提 交"/>
                <input type="button" value="返回上一页" class="reset" onclick="history.go(-1);"/>
            </div>
        </div>
    </form>
</div>
</body>
</html>
<!--表单验证-->
<script type="text/javascript" src="__PUBLIC__/admin/validator/partner_add.js"></script>
<!--省市县-->
<script type="text/javascript" src="__PUBLIC__/admin/js/cityPicker.js"></script>

<script type="text/javascript">
    $(function () {
        $('#get_invite_code').click(function () {
            $.ajax({
                type: 'POST',
                url: '/Admin/Account/getInviteCode',
                data: {},
                dataType: 'json',
                success: function (data, status) {
                    console.log(data);
                    $('#invite_code').val(data);
                },
                fail: function (err, status) {
                    console.log(err)
                }
            })
        })
    })
</script>